﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

namespace EntityFrameworkCFSem05.mapping
{
    public class ParticipanteMap:EntityTypeConfiguration<Participante>
    {
        public ParticipanteMap()
        {
            //key
            this.HasKey(p => p.Id);          

            //propiedades
            this.Property(p => p.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(p => p.Nombres)
                .HasMaxLength(200)
                .IsRequired();
        }
    }
}
